<?php 
if ((empty($_COOKIE['RealtyAppCookie_RefID'])) && $vPage<>'login' ) header("Location: login.php");

error_reporting(E_ERROR | E_WARNING | E_PARSE);
ini_set('display_errors', 1);

function jencrypt($string) { 
	$key='Seatec Astronomy';
	$result = ''; 
	for($i=0; $i<strlen($string); $i++) { 
		$char = substr($string, $i, 1); 
		$keychar = substr($key, ($i % strlen($key))-1, 1); 
		$char = chr(ord($char)+ord($keychar)); 
		$result.=$char; 
	}
	return base64_encode($result); 
}

function jdecrypt($string) { 
	$key='Seatec Astronomy';
	$result = ''; 
	$string = base64_decode($string);
	for($i=0; $i<strlen($string); $i++) { 
		$char = substr($string, $i, 1); 
		$keychar = substr($key, ($i % strlen($key))-1, 1); 
		$char = chr(ord($char)-ord($keychar)); 
		$result.=$char; 
	}
	return $result; 
}
?>